// 导入类型、接口、模块、组件、样式
import type { RouteObject } from "react-router-dom";

import { Navigate } from "react-router-dom";

// 懒加载、登录权限、Layout等
import lazyload from "./lazyload";

// 集中式路由
const routes: RouteObject[] = [
  // { path: "/login", element: lazyload("pages/Login") },
  // { path: "/login", element: lazyload("pages/Login") },
  { path: "/test1", element: lazyload("pages/test/Test1") },
  { path: "/test2", element: lazyload("pages/test/Test2") },
  { path: "/404", element: <h1>404</h1> },
  { path: "*", element: <Navigate to="/404" /> },
];

export default routes;
